package wenqi.housemediator;

public class Application {
    public static void main(String[] args) {
        ConcreteMediator mediator=new ConcreteMediator();
        RentHouse rentHouse []=new RentHouse[2];
        rentHouse[0]=new RentHouse(mediator);
        rentHouse[1]=new RentHouse(mediator);
        rentHouse[0].setName("张三");
        rentHouse[1].setName("李四");
        BegRentHouse begRentHouse []=new BegRentHouse[1];
        begRentHouse[0]=new BegRentHouse(mediator);
        begRentHouse[0].setName("朱芳");
        mediator.registerRentHouse(rentHouse);
        mediator.registerBegRentHouse(begRentHouse);
        rentHouse[0].giveMess("房屋出租：租金是800元/月");
        rentHouse[1].giveMess("房屋出租：租金是900元/月");
        begRentHouse[0].giveMess("求租房屋：租金不高于800元/月");
    }
}
